<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('打印事项审批')" />
    <style>
        .z1{font-size:13px;height: 35px;}
        td,th {border-width: 1px;border-style: solid;border-collapse: collapse; word-break: break-all; width: 250px; border-color: #333333;}
    </style>
</head>
<body class="white-bg">
    <div class="btn-group-sm hidden-xs" style="margin-left: 20px" id="toolbar" role="group">
        <a class="btn btn-success" onclick="PreviewMytable()">
            <i class="fa fa-print"></i> 打印
        </a>
    </div>
    <div id="print_content">
        <table style="width: 100%;">
            <tr class="z1">
                <td>姓名</td>
                <td>[[${recordSociety.userName}]]</td>
                <td>性别</td>
                <td>[[${@dict.getLabel('sys_user_sex', recordSociety.sex)}]]</td>
                <td>出生年月</td>
                <td>[[${recordSociety.birthday}]]</td>
            </tr>
            <tr class="z1">
                <td>所在科室</td>
                <td colspan="3">[[${recordSociety.deptName}]]</td>
                <td>专业</td>
                <td>[[${recordSociety.major}]]</td>
            </tr>
            <tr class="z1">
                <td>参加学会、协会名称</td>
                <td colspan="5">[[${recordSociety.societyTitle}]]</td>
            </tr>
            <tr class="z1">
                <td>申请期限</td>
                <td colspan="3">[[${recordSociety.startTime}]]至[[${recordSociety.endTime}]]</td>
                <td colspan="2">申请日期：[[${#dates.format(recordSociety.createTime, 'yyyy-MM-dd')}]]</td>
            </tr>
            <tr class="z1">
                <td>科教科意见</td>
                <td colspan="3">[[${recordSociety.scienceOpinion}]]</td>
                <td colspan="2">科教科签字：[[${recordSociety.scienceName}]]</td>
            </tr>
            <tr class="z1">
                <td>分管领导意见</td>
                <td colspan="3">[[${recordSociety.scienceLeaderOpinion}]]</td>
                <td colspan="2">分管领导签字：[[${recordSociety.scienceLeaderName}]]</td>
            </tr>
            <tr class="z1">
                <th colspan="2">已参加学会、协会名称</th>
                <th colspan="2">开始时间</th>
                <th colspan="2">结束时间</th>
            </tr>
            <tr th:each="info:${recordSociety.recordSocietyContentList}" class="z1">
                <td colspan="2">[[${info.title}]]</td>
                <td colspan="2">[[${info.startDate}]]</td>
                <td colspan="2">[[${info.endDate}]]</td>
            </tr>
        </table>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: lodop-js" />
    <script th:inline="javascript">
        var LODOP; //声明为全局变量

        var societyId = [[${recordSociety.societyId}]];

        function PreviewMytable() {
            LODOP = getLodop();

            LODOP.SET_PRINT_PAGESIZE(0,0,0,"A4");
            var strStyle="<style> .z1{font-size:13px;height: 35px;}td,th {border-width: 1px;border-style: solid;border-collapse: collapse; word-break: break-all; width: 250px; border-color: #333333;} </style>";
            LODOP.ADD_PRINT_TEXT("10mm","70mm","70mm","12mm","事项审批表");
            LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
            LODOP.SET_PRINT_STYLEA(0,"Bold",1);
            LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
            LODOP.SET_PRINT_STYLEA(0,"Horient",3);
            LODOP.ADD_PRINT_TABLE("20mm","10mm","90%","50%",strStyle+document.getElementById("print_content").innerHTML);

            LODOP.PREVIEW();
        }
    </script>
</body>
</html>